package com.explorati.design_pattern.comparson.creational.builder.v2;

public class Director {

	private SuperMan buildAdultSuperMan() {
		Builder asmb = new AdultSuperManBuilder();
		asmb.buildBody("强壮的身体");
		asmb.buildSpecialTalent("力大无穷");
		asmb.buildSpecialSymbol("胸前有S标志");
		return asmb.build();
	}

	private SuperMan buildChildSuperMan() {
		Builder asmb = new ChildSuperManBuilder();
		asmb.buildBody("灵敏的身体");
		asmb.buildSpecialTalent("快速移动");
		asmb.buildSpecialSymbol("胸前有小S标志");
		return asmb.build();
	}

	public SuperMan getSuperMan(String type) {
		if (type.equals("adult")) {
			return this.buildAdultSuperMan();
		} else if (type.equals("child")) {
			return this.buildChildSuperMan();
		} else {
			return null;
		}
	}
}
